From d16d2a3535141f34afcf86ffd18ccf992543cb07 Mon Sep 17 00:00:00 2001 From: Sascha Steinbiss Date: Sat, 8 May 2021 10:58:01 +0000 Subject: [PATCH] add hardening flags Last-Update: 2016-01-08 Adds necessary build flags for hardening. Gbp-Pq: Name hardening --- Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 1e11a07..2e3b002 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,27 @@ -CC= gcc -CFLAGS= -g -Wall -O2 -fPIC #-fno-inline-functions -fno-inline-functions-called-once -CPPFLAGS= +CC?= gcc +CFLAGS+= -g -Wall -O2 -fPIC #-fno-inline-functions -fno-inline-functions-called-once +#CPPFLAGS= INCLUDES= OBJS= kthread.o misc.o \ bseq.o htab.o bfc.o \ rle.o rope.o mrope.o rld0.o \ unitig.o mag.o bubble.o ksw.o PROG= fml-asm -LIBS= -lm -lz -lpthread +LDLIBS+= -lm -lz -lpthread SONUMBER=0 .SUFFIXES:.c .o -.c.o: - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $< -o $@ - all:$(PROG) libfml.so.$(SONUMBER) fml-asm:libfml.a example.o - $(CC) $(CFLAGS) $^ -o $@ -L. -lfml $(LIBS) + $(CC) $(LDFLAGS) $(CFLAGS) $^ -o $@ -L. -lfml $(LDLIBS) libfml.a:$(OBJS) $(AR) -csru $@ $(OBJS) libfml.so.$(SONUMBER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -fPIC -Wl,-soname,libfml.so.$(SONUMBER) $(LIBS) $(LDFLAGS) + $(CC) $(LDFLAGS) -shared -o $@ $(OBJS) -fPIC -Wl,-soname,libfml.so.$(SONUMBER) $(LDLIBS) clean: -- 2.30.2